﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Recherche.aspx.cs" Inherits="WebApplication1.Recherche" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
RECHERCHE
</h2>
    <%--<asp:SqlDataSource ID="recherchetps" 
  SelectCommand="SELECT * FROM [Recette] WHERE ([tps_preparation] = @tps_preparation)" 
  ConnectionString="<%$ ConnectionStrings:recherche %>"
 
  RunAt="server">
  <SelectParameters>
    <asp:Parameter Name="tps_preparation" Type="Int32" />
    </SelectParameters>
  </asp:SqlDataSource>--%>
<table>
<tr>
<td><asp:RadioButton ID="Ingredients" runat="server" groupname="choix" autopostback="true"
        Text="Inclure l'ingrédient suivant" checked="true"/></td>
<td rowspan="3">
    <asp:GridView ID="Recette" runat="server" 

        AutoGenerateColumns="False" 
        DataKeyNames="id_recette">
<Columns>

                <asp:BoundField DataField="id_recette" HeaderText="id_recette" 
                    SortExpression="id_recette" InsertVisible="False" ReadOnly="True" />
                <asp:BoundField DataField="nom" HeaderText="nom" 
                    SortExpression="nom" />
                <asp:BoundField DataField="sous_titre" HeaderText="sous_titre" 
                    SortExpression="sous_titre" />
                <asp:BoundField DataField="tps_preparation" HeaderText="tps_preparation" 
                    SortExpression="tps_preparation" />
                <asp:BoundField DataField="tps_cuisson" HeaderText="tps_cuisson" 
                    SortExpression="tps_cuisson" />
             </Columns>
    </asp:GridView></td>
</tr>
<tr>
<td><asp:RadioButton ID="Exclure" runat="server" groupname="choix" autopostback="true"
        Text="Exclure l'ingrédient suivant" checked="true"/></td>
</tr>
<tr>
    
    
<td><asp:DropDownList ID="DropDownListIng" runat="server" 
        DataSourceID="SqlDataSource1" DataTextField="Nom" DataValueField="IdIngredient">
    </asp:DropDownList>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:recherche %>" 
        SelectCommand="SELECT [Nom], [IdIngredient] FROM [Ingredient]">
    </asp:SqlDataSource></td>

</tr>      
<tr>
<td><asp:RadioButton ID="Temps" runat="server" groupname="choix" autopostback="true"
        Text="Temps total (préparation et réalisation)"/></td>
</tr>
<tr><td>compris entre <asp:TextBox ID="minduree" runat="server" Width="40px"></asp:TextBox> et 
<asp:TextBox ID="maxduree" runat="server" Width="40px"></asp:TextBox> minutes</td>

</tr>



<tr><td>
    <asp:Button ID="Submit" runat="server" onclick="Button1_Click" 
        Text="Lancer la recherche" />
 
    </td></tr>

</table>
</asp:Content>

